package com.carserver.service;


import com.carserver.pojo.Order_detail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface Order_detailDao extends JpaRepository<Order_detail,Integer> {

    @Query(value = "select * from order_detail where order_id=:order_id",nativeQuery = true)
    List<Order_detail> findOrder_detailByOrderId(@Param("order_id") String orderId);

    @Query(value = "select * from order_detail where user_id=:user_id",nativeQuery = true)
    List<Order_detail> findOrder_detailByUser_id(@Param("user_id") String user_id);

}
